﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Training.Dia1.Data.Entities;

namespace Training.Dia1.Data.Mappings
{
    public class PeriodoMap : EntityTypeConfiguration<Periodo>
    {
        public PeriodoMap()
        {
            ToTable("Periodos");

            HasKey(t => t.Id);

            Property(t => t.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            Property(t => t.Name);
            Property(t => t.Fecha);
        }
    }
}
